﻿Imports System.Web
Imports System.Web.Services

Public Class chat_wap
    Implements System.Web.IHttpHandler

    Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest

        Dim obj As New ChatMessage

        If context.Request.Form("s") IsNot Nothing Then
            obj.Text = context.Request.Form("s")
            obj.From = context.Request.Form("f")
            obj.Time = Now.ToBinary
            obj.Save()
        End If

        Dim o As New ChatMessage

        Dim resp = o.BuildChatMessageListHtml

        context.Response.ContentType = "text/html"

        context.Response.Write(resp)

    End Sub

    ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
        Get
            Return False
        End Get
    End Property

End Class